Thunks (Continued)

نویسندگان

  • Olivier Danvy
  • John Hatcliff
چکیده

Call-by-name can be simulated in a call-by-value setting using \thunks" (i.e., parameterless procedures) or continuation-passing-style (CPS). In this paper we uncover a relationship between the two simulations. We prove that the call-by-value CPS transformation Cv, when applied to a term T (t) which simulates call-by-name using thunks, yields a term identical to the call-by-name CPS transformation Cn applied directly to t (modulo renaming): Cv T Cn This result sheds new light on the call-by-name CPS transformation | it can be factored into two conceptually distinct steps: the suspension of argument evaluation (captured in T); the sequentialization of function application to give the usual tail-calls of CPS terms (captured in Cv).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Thunks and the λ-Calculus

Thirty-five years ago, thunks were used to simulate call-by-name under call-by-value in Algol 60. Twenty years ago, Plotkin presented continuation-based simulations of call-by-name under call-by-value and vice versa in the λ-calculus. We connect all three of these classical simulations by factorizing the continuation-based call-by-name simulation Cn with a thunk-based call-by-name simulation T ...

متن کامل

Modular, Higher-Order Cardinality Analysis in Theory and Practice Extended version

Since the mid ’80s, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However it has proved difficult to achieve both power and simplicity in practice. We describe a new, modular analysis for a higher-order language, which is both simple and effective, and present measurements of...

متن کامل

In submission Modular , Higher - Order Cardinality Analysis in Theory and Practice

Since the mid 80's, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However it has proved difficult to achieve both power and simplicity in practice. We describe a new, modular analysis for a higher-order language , which is both simple and effective, and present measurements o...

متن کامل

In submission Modular , Higher - Order Cardinality Analysis in Theory and Practice

Since the mid 80's, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However it has proved difficult to achieve both power and simplicity in practice. We describe a new, modular analysis for a higher-order language , which is both simple and effective, and present measurements o...

متن کامل

Higher - Order Cardinality Analysis Extended version

Since the mid 80’s, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However it has proved difficult to achieve both power and simplicity. We describe a new, modular analysis for a higher-order language, which is both simple and effective, and present measurements of its use in ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1992